var testConfig = require('../testConfig');
function TestProject() {
  this.init = function () {
    var arr = [];
    arr.push(
      this.step1,
      this.step2,
      this.step3,
      this.step4,
      this.step5,
      this.step6,
      this.step7,
      this.step8,
      this.step9,
      this.step10
    );
    testConfig.testFun.runStep(arr);
  };
  this.step1 = function () {
    $(".index-aside-nav-menu li").eq(3).click();
  };
  this.step2 = function () {
    testConfig.testFun.as().find("table tr td.cmn-is-delivery a")[0].click()
  };
  this.step3 = function () {
    testConfig.testFun.bs().find(".cmn-save-btn").click();
  };
  this.step4 = function () {
    testConfig.testFun.as().find(".cmn-query-import[data-name='driverName']").val("自动化");
  };
  this.step5 = function () {
    testConfig.testFun.as().find(".cmn-query-import[data-name='driverPhone']").val("15363231236");
  };
  this.step6 = function () {
    testConfig.testFun.as().find(".cmn-delivery-number").val("1");
  };
  this.step7 = function () {
    testConfig.testFun.as().find(".cmn-save-btn").click();
  };
  this.step8 = function () {
    testConfig.testFun.bs().find(".cmn-save-btn").click();
  };
  this.step9 = function () {
    var deliverNum = testConfig.testFun.as().find(".cmn-print-number span").html();
    console.log(deliverNum);
  };
  this.step10 = function () {
    var orderNum = testConfig.testFun.as().find("tr td:nth(1)").html();
    console.log(orderNum);
  };
}
function testStart() {
  var test = new TestProject();
  test.init();
}
exports.start = testStart;
